package com.twu.biblioteca;

import com.twu.biblioteca.*;
public class Book {

    String bookName;
    String author;
    String accessionNumber;
    String isbn;
    boolean availability;
    StringBuilder sb = new StringBuilder();

    public Book(String bookName, String author, String accessionNumber, String isbn, boolean availability)
    {
      this.bookName = bookName;
      this.author = author;
      this.accessionNumber = accessionNumber;
      this.isbn = isbn;
      this.availability = availability;

    }



    public String bookIssue() {
        sb.setLength(0);

        if (availability) {
        sb.append("Thankyou !! Enjoy the Book!!");
        availability=false;
        }
        else
        sb.append("Sorry the book is reserved");
        return sb.toString();
    }

    public String bookReturn() {
        sb.setLength(0);
        if(!availability){
        sb.append("Thank you for returning the book!!");
        availability=true;
        }
        else
        sb.append("Sorry you did not reserve the book");
        return sb.toString();

    }

}
